import http from '@/utils/api/index'
const uploadFile = async (file, filename = 'blob') => {
  const param = new FormData()
  param.append('file', file, filename)

  const config = { headers: { 'Content-Type': 'multipart/form-data' } }
  let res = await http.post('/common/upload', param, config)
  return res.data
}

// const uploadFiles = async (files) => {
//   const param = new FormData()
//   param.append('files', files)
//   const config = { headers: { 'Content-Type': 'multipart/form-data' } }
//   let res = await http.post('/common/uploads', param, config)
//   return res
// }

export { uploadFile }
